#include "as5048_pwm.h"


#define AS5048_PWM_T 			4119
#define AS5048_PWM_ZERO 	16
#define AS5048_PWM_DATA   4095



float as5048_get_pwm_deg(uint32_t T, uint32_t higt)
{
	float pwm_bit = T / AS5048_PWM_T;
	float data_num = higt / pwm_bit - AS5048_PWM_ZERO;
	float data_deg = data_num / AS5048_PWM_DATA * 360.0f;
	
	return data_deg;
}













